/*
 * 类目 项目管理
 */
import { getRequest, postRequest, getdownloadRequest, downloadRequest } from '/@/lib/axios';

export const ProManageApi = {
    //资金申请的数据
    ProMangeInit: (param) => {
        return postRequest('/foundation/blapply/list', param);
    },
    //表单lable以及数据
    TableInite: (param) => {
        return postRequest('/foundation/blbudgetdata/listData', param);
    },
    //项目名称以及编号
    ProjectNameNum: (param) => {
        return postRequest('/foundation/blbudget/finishList', param);
    },
    //执行单位
    DeportInit: (param) => {
        return getRequest('/foundation/bldept/getAll');
    },
    //资金添加
    AddProMange: (param) => {
        return postRequest('/foundation/blapply/save', param);
    },
    //资金日志接口
    ConLogProManage: (param) => {
        return postRequest(`/foundation/blacelog/zisyList`, param);
    },
    //资金详情接口
    ProMangeDetail: (blapplyid) => {
        return getRequest(`/foundation/blapply/info/${blapplyid}`);
    },
    //资金删除
    ProMangeDelete: (param) => {
        return postRequest('/foundation/blapply/delete', param);
    },
    //资金修改接口
    ProMangeUpdate: (param) => {
        return postRequest('/foundation/blapply/update', param);
    },
    //资金查看状态
    ProMangeStatus: (blapplyids) => {
        return getRequest(`/foundation/blapply/getStutus/${blapplyids}`);
    },
    //资金历史记录
    ProMangeHoistry: (blapplyid) => {
        return getRequest(`/foundation/blapply/histinfo/${blapplyid}`);
    },
    //填写实际资金
    ActualFind: (param) => {
        return postRequest('/foundation/blapply/saveBxje', param);
    },
    //资金申报书下载
    MoneyDowload: (param) => {
        return getRequest('/foundation/blapply/fileUplod', param);
    },
    /* 
    年度预算
    */
    //    年度预算列表  /foundation/blbudget/list

    blbudgetList: (params) => {
        return postRequest(`/foundation/blbudget/list`, params);
    },

    // 获取新增 表单项数据  /foundation/blbudgetdata/listData

    AddlistData: () => {
        return postRequest(`/foundation/blbudgetdata/listData`);
    },

    // 审批完成的项目  /foundation/blapplyprojectinfo/getFinishProject
    getFinishProject: () => {
        return getRequest(`/foundation/blapplyprojectinfo/getFinishProject`);
    },
    // 新增 /foundation/blbudget/save
    AddBudget: (params) => {
        return postRequest(`/foundation/blbudget/save`, params);
    },
    // 修改  /foundation/blbudget/update
    UpdateBudget: (params) => {
        return postRequest(`/foundation/blbudget/update`, params);
    },

    // 删除  /foundation/blbudget/delete
    deleteBudget: (categoryId) => {
        return postRequest(`/foundation/blbudget/delete`, categoryId);
    },
    // 查找某条的单条信息  /foundation/blbudget/info/40
    getInfo: (id) => {
        return getRequest(`/foundation/blbudget/info/${id}`);
    },
    // 查找状态  /foundation/blbudget/getStatus/44
    getStatus: (id) => {
        return getRequest(`/foundation/blbudget/getStatus/${id}`);
    },
    // 操作记录  /foundation/blacelog/BudList
    getRecord: (parmas) => {
        return postRequest(`/foundation/blacelog/BudList`, parmas);
    },
    // 提交审批意见  /foundation/blbudget/updateApprovalOpinion
    updateApprovalOpinion: (params) => {
        return postRequest(`/foundation/blbudget/updateApprovalOpinion`, params);
    },
    // 预算审批列表  /foundation/blbudget/getListApprovalOpinion

    AddBgetListApprovalOpinionudget: (params) => {
        return postRequest(`/foundation/blbudget/getListApprovalOpinion`, params);
    },

    // 预算申报书下载  /foundation/blbudget/fileUplod?blbudgetids=1
    downloadBlbudget: (id) => {
        return getdownloadRequest(`/foundation/blbudget/fileUplod?blbudgetids=${id}`);
    },
    // 扫描件上传/foundation/blbudget/fileUplod
    blbudgetUpload: (id, parmas) => {
        return postRequest(`/foundation/blbudget/fileUplod?blbudgetids=${id}`, parmas);
    },
    // 预算审核列表  /foundation/blbudget/getListCheck
    getListCheck: (params) => {
        return postRequest(`/foundation/blbudget/getListCheck`, params);
    },
    /* 
    项目结项
     */
    //申请 列表 
    blclosureList: (params) => {
        return postRequest(`/projectCompletion/getProComList`, params);
    },
    // 已完成项目 
    getApplyFinish: () => {
        return getRequest(`/projectCompletion/getApplyFinish`);
    },
    // 添加结项审批   
    AddComplete: (params) => {
        return postRequest(`/projectCompletion/saveProCom`, params);
    },
    // 获取记录 
    getLog: (id) => {
        return getRequest(`/projectCompletion/getLog?closureId=${id}`);
    },
    // 查看单条信息  /projectCompletion/getById?id=4
    getComInfo: (id) => {
        return getRequest(`/projectCompletion/getById?id=${id}`);
    },
    // 删除记录 /projectCompletion/delete

    deleteCom: (categoryId) => {
        return postRequest(`/projectCompletion/delete`, categoryId);
    },
    // 修改 /projectCompletion/updateById
    UpdateComplete: (params) => {
        return postRequest(`/projectCompletion/updateById`, params);
    },
    // 获取申报流程  /projectCompletion/getTheReviewProcess?closureId=4
    getTheReviewProcess: (id) => {
        return getRequest(`/projectCompletion/getTheReviewProcess?closureId=${id}`);
    },
    // 审批列表  /projectCompletion/queryEachList
    getApprovalList: (params) => {
        return postRequest(`/projectCompletion/queryEachList`, params);
    },
    // 进行审批u  /projectCompletion/updateStatus
    updateStatus: (params) => {
        return postRequest(`/projectCompletion/updateStatus`, params);
    },
    // 审核列表  /projectCompletion/generalManagementAuditList
    getExamineList: (params) => {
        return getRequest(`/projectCompletion/generalManagementAuditList?${params}`);
    },
    // 上传申报书  /projectCompletion/uploadTheDeclaration?blclosureids=27
    uploadTheDeclaration: (id, parmas) => {
        return postRequest(`/projectCompletion/uploadTheDeclaration?blclosureids=${id}`, parmas);
    },
    // 结项申报书下载  /projectCompletion/fileUpload?blclosureids=1
    download: (id) => {
        return getdownloadRequest(`/projectCompletion/fileUpload?blclosureids=${id}`);
    },
};
